K5
Functions
Use this property to get the actual k5 Playground size in Floats. Subtracting the 56f - which is the toolbar height of the window. When the size of the window is set with size param in k5 builder, it's applied to window and when the canvas is rendered in the window with Modifier.fillMaxSize it takes whole window except the toolbar.
Use this property to get the actual k5 Playground size in Ints
Shows the canvas window and renders it for each frame repetitively. Internally, this starts the Jetpack Compose Window and renders the sketch requested by user into the Jetpack Compose Canvas Composable. The size of the Canvas will be same as the size passed in k5 method by default. One can change the canvas size and window size with the help of modifiers. In order to keep the animation running (rendering canvas continuously), it requests to run the frame of animation in nanos. All the modifier will be applied to the Canvas.
Shows canvas window as well as controls view side by side. Internally, this starts the Jetpack Compose Window and renders the sketch requested by user into the Jetpack Compose Canvas Composable. The size of the Canvas will be same as the size passed in k5 method by default. One can change the canvas size and window size with the help of modifiers. In order to keep the animation running (rendering canvas continuously), it requests to run the frame of animation in nanos.
Properties
Use this property to get the actual k5 Playground size in Floats. Subtracting the 56f - which is the toolbar height of the window. When the size of the window is set with size param in k5 builder, it's applied to window and when the canvas is rendered in the window with Modifier.fillMaxSize it takes whole window except the toolbar.